﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Timers;
using System.Windows;

namespace SnelsteRoute
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public App()
        {

            try
            {
                var loading = new Loading();

                loading.Show();

                ConfigurationLoader.Load();

                loading.Visibility = Visibility.Hidden;
            }
            catch(Exception ex)
            {
                MessageBox.Show("Error " + ex.Message);
            }
        }

        private Window _main;

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            _main = new MainWindow();
            _main.WindowStartupLocation = WindowStartupLocation.CenterScreen;

            _main.ShowDialog();
        }

    }
}
